package com.whli.autumn.mall.web.controller.convert.sale;

import com.whli.autumn.mall.sale.domain.dto.saleorder.SaleOrderAddDTO;
import com.whli.autumn.mall.sale.domain.dto.saleorder.SaleOrderUpdateDTO;
import com.whli.autumn.mall.sale.domain.entity.SaleOrder;
import com.whli.autumn.mall.sale.domain.vo.saleorder.SaleOrderVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * <p>销售订单转换工具</p>
 *
 * @author whli
 * @version 1.0.0
 * @since 2023-05-01 16:38
 */
@Mapper
public interface SaleOrderConvert {

    SaleOrderConvert INSTANCE = Mappers.getMapper(SaleOrderConvert.class);

    SaleOrder addToDomain(SaleOrderAddDTO dto);

    SaleOrder updateToDomain(SaleOrderUpdateDTO dto);

    SaleOrderVO domainToVO(SaleOrder entity);

}
